package com.kgc.cgapi.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.kgc.basic.annotation.DetailEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class CGXJPojo implements Serializable {
    @ExcelIgnore
    private int id;
    @ExcelProperty("编号*")
    private String code;
    @ExcelProperty("uid*")
    private int uid;
    @ExcelProperty("业务员")
    private String userName;
    @ExcelProperty("详情*")
    private String info;
    @ExcelIgnore
    private int status;
    @ExcelProperty("采购申请源单号*")
    private String cgsq_code;

    @ExcelIgnore
    private String create_date;
    @ExcelIgnore
    private int create_id;
    @ExcelIgnore
    private String modi_date;
    @ExcelIgnore
    private int modi_id;
    @ExcelIgnore
    private String get_date;
    @ExcelProperty("总金额")
    private BigDecimal total;

    @ExcelIgnore
    @DetailEntity(detailClass = CGXJInfo.class, relationField = "major_code")
    private List<CGXJInfo> list;

    @ExcelProperty("总数量*")
    private String total_num;
    @ExcelProperty("收货地址*")
    private String address;
    @ExcelIgnore
    private int son_num;
    @ExcelIgnore
    private static final SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd");

    @Override
    public String toString() {
        return "CGXJPojo{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", uid=" + uid +
                ", info='" + info + '\'' +
                ", status=" + status +
                ", cgsq_code='" + cgsq_code + '\'' +
                ", create_date='" + create_date + '\'' +
                ", create_id=" + create_id +
                ", modi_date='" + modi_date + '\'' +
                ", modi_id=" + modi_id +
                ", get_date='" + get_date + '\'' +
                ", total=" + total +
                ", list=" + list +
                ", total_num='" + total_num + '\'' +
                ", address='" + address + '\'' +
                ", son_num=" + son_num +
                '}';
    }

    public String getCgsq_code() {
        return cgsq_code;
    }

    public void setCgsq_code(String cgsq_code) {
        this.cgsq_code = cgsq_code;
    }

    public String getTotal_num() {
        return total_num;
    }

    public void setTotal_num(String total_num) {
        this.total_num = total_num;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getSon_num() {
        return son_num;
    }

    public void setSon_num(int son_num) {
        this.son_num = son_num;
    }

    public List<CGXJInfo> getList() {
        return list;
    }

    public void setList(List<CGXJInfo> list) {
        this.list = list;
    }

    public BigDecimal getTotal() {
        return total;
    }

    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getCreate_date() {
        return create_date;
    }

    public void setCreate_date(Date create_date) {
        this.create_date = FORMAT.format(create_date);
    }

    public int getCreate_id() {
        return create_id;
    }

    public void setCreate_id(int create_id) {
        this.create_id = create_id;
    }

    public String getModi_date() {
        return modi_date;
    }

    public void setModi_date(Date modi_date) {
        this.modi_date = FORMAT.format(modi_date);
    }

    public int getModi_id() {
        return modi_id;
    }

    public void setModi_id(int modi_id) {
        this.modi_id = modi_id;
    }

    public String getGet_date() {
        return get_date;
    }

    public void setGet_date(Date get_date) {
        this.get_date = FORMAT.format(get_date);
    }
}
